// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
    const wxContext = cloud.getWXContext()
    const {limit} = event;   // 参数 data 
    const db = cloud.database()
    const result = await db.collection("wh2107_user")
    .where({})
    .get()


    return {
        event,
        ...result,
        msg:"查询User成功"
    }
}